﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace LPlus.Models.AccountViewModels
{
    public class LoginViewModel
    {
        [Required(AllowEmptyStrings =false,ErrorMessage = "{0}必须输入")]        
        [EmailAddress(ErrorMessage ="{0}格式不正确")]
        [Display(Name ="邮箱")]
        public string Email { get; set; }

        [Required(AllowEmptyStrings = false, ErrorMessage = "{0}必须输入")]
        [StringLength(100, ErrorMessage = "{0} 必须至少包含 {2} 个字符。", MinimumLength = 6)]
        [DataType(DataType.Password, ErrorMessage = "{0}格式不正确")]
        [Display(Name = "密码")]
        public string Password { get; set; }

        [Display(Name = "记住登录?")]
        public bool RememberMe { get; set; }
    }
}
